home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / Rewrite 0.2.6 / ReWrite 0.2.6 Docs / ReWrite 0.2.6 Docs.rsrc / TEXT_137.txt < prev    next >
Encoding:
Text File  |  1995-08-23  |  1.2 KB  |  46 lines

  1.  
  2. Appendix 1 - Conventions
  3.  
  4. The following typeface conventions are used to make the documentation clearer:
  5.  
  6. ‚Ä¢ Header 
  7.  
  8. ‚Ä¢ Subheader 
  9.  
  10. ‚Ä¢ code 
  11.    - this style is used for all code examples, except see below.
  12.  
  13. ‚Ä¢ meta-variable  
  14.    - this is used for meta-variables in the code, for example int  would mean that an integer or integer valued function or parameter should be used in that place.
  15.  
  16. ‚Ä¢ function template (as for code, but black rather than blue)
  17.    - this is used for syntactic definition of a function - what types required, what types returned.
  18.  
  19. ‚Ä¢ source code for function
  20.    - this is used where a piece of source code is given without supporting text, for example the source code of a library.
  21.  
  22. ‚Ä¢ warning
  23.    - this is used for any text that needs to stand out.
  24.  
  25. In the function documentation, usually there is
  26.    - a subheader (these may be grouped),
  27.    - a description of the function,
  28.    - the syntactic template,
  29.    - the source code if any (sometimes 'direct coded' is used)
  30.    - any examples.
  31.  
  32. For example:
  33.  
  34. length
  35.  
  36. length returns the number of elements in a list passed to it.
  37.  
  38. length[list ]-> int ;
  39.  
  40.   length[{}] -> 0;
  41.   length[{a,.b}] -> length[b]+1;
  42.  
  43. Example:
  44.   length[{41,42,{4,3,9},44}] -> 4
  45.  
  46.